<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("modelConfigPath", "billing");
%>
<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>
<style >
	#outStockInfoCopy{display:none}
	.thumbnail{margin: 0px}
	#logo{margin: 0px;padding: 0px;}
	#pic{padding: 0px;height:60px;width:60px;}
	td input{margin-top:-1px;margin-bottom:-1px;height:21px; width:98%;border:none;color:red}
	#area{
		height:362px;
		width:1180px;
		overflow-y:auto; 
		overflow-x:hidden; 
	}
	
	body{
		font-size:9px ;
		font-family:黑体,微软雅黑;
	}
	.table{
		border:black 1px solid !important;
	}
	.table tr th{
		border:black 1px solid !important;
		text-align: center;
		padding:0px 2px !important;
	}
	.table tr td{	
		border:black 1px solid !important;
		padding:0px 2px !important;
		text-align: center;
	}
</style>
<script type="text/javascript">
	function paceDoneCallback(){
		window.print();
		top.$("#modal_billing_form").modal("hide");
	} 
</script>
<div id="printContent" >
	<div class="text-center"><h3>订货单</h3></div>
		<table class="table table-bordered text-left">
	   <tr>
	      <td >订单号</td>
	      <td >${billing.billingNo}</td>
	      <td >下单日期</td>
	      <td>${billing.createDate}</td>
	       <td >交货日期</td>
	      <td>${billing.deliveryDate}</td>
	   </tr>
	   <tr>
	   	  <td >开单人</td>
	   	  <td>${billing.createUserName}</td>
	   	  <td >客户</td>
	   	  <td>${billing.customer.customerName}</td>

	   	  <td >折扣</td>	 
	      <td>${billing.discount}</td>
	   </tr>	
	   <tr>
	   	  <td >收货地址</td>
	      <td colspan="3">${billing.address}</td>
	   	  <td >客户电话</td>	 
	   	  <td >${billing.customer.customerTel}</td> 
	   </tr>   	    
	</table>
	<table class="table " style="margin-top:10px;">
		<tr>
			<th style="width:50px">序号</th>
           	<th style="width:100px">商品编码</th>
           	<th style="width:100px">商品名称</th>
           	
           	<th style="width:100px">规格1</th>
           	<th style="width:100px">规格2</th>
           	<th style="width:100px">数量</th>
           	<th style="width:100px">单价</th>
           	<th style="width:100px">小计</th>
		</tr>
		<c:set var="nullAll"  value="0"/>
		<c:set var="realPriceAll"  value="0"/>
		<c:set var="sequence"  value="0"/>
		<c:forEach var="outStockShow" items="${billing.outStock.outStockShows}">
			<c:forEach var="outStockCollocation" items="${outStockShow.outStockCollocations}" >
				<c:set var="nullAll"  value="${nullAll +outStockCollocation.collocationNum}"/>
				<c:set var="realPriceAll"  value="${realPriceAll +outStockCollocation.realPrice*outStockCollocation.collocationNum}"/>
				<tr id="outStockCollocation_${sequence}">

					<td>${sequence +1}</td>				
	            	<td>${outStockShow.cargo.cargoNo}</td>
	            	<td>${outStockShow.cargo.cargoName}</td>
	            	<td>${outStockCollocation.collocation.propertyNameOne}</td>
	            	<td>${outStockCollocation.collocation.propertyNameTwo}</td>
					
					<td>${outStockCollocation.collocationNum}</td>
					<td>${outStockCollocation.realPrice}</td>
					<td>${outStockCollocation.realPrice*outStockCollocation.collocationNum}</td>
				</tr>
				<c:set var="sequence"  value="${sequence +1}"/>
			</c:forEach>
		</c:forEach>
		<tr>
			<td colspan="5">合计:</td>
			<th >${nullAll}</th>
           	<th ></th>
           	<th >${realPriceAll}</th>
		</tr>
	</table>
</div>

<script type="text/javascript">

</script>
<%request.setAttribute("noScripts","formpickers.location;"); %>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formvalidations.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/notifications.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/ui/moment.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formpickers.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/contentFooter.jsp"%>